package com.station.search.domain.converter;

import com.station.search.domain.StationRepairRecord;
import com.station.search.domain.dto.StationRepairRecordDTO;
import com.station.search.domain.vo.StationRepairRecordVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author: JT
 * @date: 2021/10/26
 * @Title:
 */
@Mapper
public interface StationRepairRecordConverter {

    StationRepairRecordConverter INSTANCE = Mappers.getMapper(StationRepairRecordConverter.class);

    StationRepairRecordDTO doToDto(StationRepairRecord recordDo);

    @Mapping(source = "repairDate", target = "repairDate", dateFormat = "yyyy-MM-dd HH:mm:ss")
    StationRepairRecord voToDo(StationRepairRecordVO stationRepairRecordVO);
}
